home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / QuickTime / Programming Stuff / Sample Code / Movie Toolbox / Inside Mac Movie Toolbox Code / mtb6.c < prev    next >
Encoding:
Text File  |  1994-12-05  |  1.1 KB  |  53 lines  |  [TEXT/MPS ]

  1. /*
  2.   File:            mtb6.c
  3.   Contains:        Movie Creation Functions
  4.   Written by:    DTS and QT Engineering
  5.   Copyright:    © 1992-1994 by Apple Computer, Inc., all rights reserved.
  6.   Change History (most recent first):
  7.   <1>         12/4/94    khs        changed the format of the file to the new look and feel
  8.   To Do:
  9. */
  10.  
  11.  
  12. // INCLUDE FILES
  13. #include "mtb.h"
  14.  
  15.  
  16. // FUNCTIONS
  17. void CreateMyCoolMovie(void)
  18. {
  19.     Point where =
  20.     {
  21.         100,  100
  22.     }
  23.     ;
  24.  
  25.     SFReply theSFReply;
  26.     Movie theMovie = nil;
  27.     FSSpec mySpec;
  28.     short resRefNum = 0;
  29.     short resId = 0;
  30.     OSErr err = noErr;
  31.  
  32.     SFPutFile(where, "\pEnter movie file name:", "\pMovie File", nil, &theSFReply);
  33.     if (!theSFReply.good)
  34.         return;
  35.  
  36.     FSMakeFSSpec(theSFReply.vRefNum, 0, theSFReply.fName, &mySpec);
  37.  
  38.     err = CreateMovieFile(&mySpec, 'TVOD', smCurrentScript, createMovieFileDeleteCurFile, &resRefNum, &theMovie);
  39.     CheckError(err, "\pCreateMovieFile");
  40.  
  41.     CreateMyVideoTrack(theMovie);
  42.     CreateMySoundTrack(theMovie);
  43.  
  44.     err = AddMovieResource(theMovie, resRefNum, &resId, theSFReply.fName);
  45.     CheckError(err, "\pAddMovieResource");
  46.  
  47.     if (resRefNum)
  48.         CloseMovieFile(resRefNum);
  49.     DisposeMovie(theMovie);
  50. }
  51.  
  52.  
  53.